package top.coolxue.common.result;

import java.io.Serializable;

public class JsonResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private boolean status;
    private String message;
    private T object;
    private String dataId;

    public JsonResult() {
        this.status = true;
        this.message = "";
    }

    public JsonResult(T object) {
        this.status = true;
        this.message = "";
        this.object = object;

    }

    public JsonResult(boolean status, String message) {
        this.status = status;
        this.message = message;
    }

    public JsonResult(boolean status, String message, T object) {
        this.status = status;
        this.message = message;
        this.object = object;
        this.dataId = object.toString();
    }

    public JsonResult(boolean status, String message, String dataId) {
        this.status = status;
        this.message = message;
        this.dataId = dataId;
    }

    public boolean isStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

    public T getObject() {
        return object;
    }

    public String getDataId() {
        return dataId;
    }
}
